﻿using FluentNHibernate.Mapping;
using SOLInfo.GEN.Domain.Entities;
using SOLInfo.GEN.Domain.VO;

namespace SOLInfo.GEN.Repository.Mappings
{
    public class NewsletterMapping : ClassMap<Newsletter>
    {
        public NewsletterMapping()
        {
            Id(x => x.Codigo);
            Map(x => x.Assunto);
            Map(x => x.EmailDestinatario);
            Map(x => x.NomeDestinatario);
            Map(x => x.SeuEmail);
            Map(x => x.SeuNome);
            Map(x => x.Texto);

            Component<Manutencao>(x => x.Criacao, MappingBase.MapManutencao("Criacao"));
            Component<Manutencao>(x => x.UltimaAlteracao, MappingBase.MapManutencao("Alteracao"));
        }
    }
}
